<!DOCTYPE html>
<html>
    <head>
        <script>
            /*
            var arr = new Array("a","b","c");
            alert(arr.length);
            alert(arr);
            var b = arr.join("+");
            alert(b);   
            for(var c = 0; c < arr.length; c++){
                alert(c);
            }
            */
           var now = new Date();
           console.log(now);
           console.log(now.getTime());
           console.log(now.toLocaleDateString());

           var randomNum = Math.random();
            console.log(randomNum)
            var roundNum = Math.round(3.1415);
            console.log(roundNum);
            var num1 = 3.1462;
            console.log(num1.toFixed(2));

            var a = Math.random();
             a = Math.round(a * 10);
             console.log(a);



             var c = "北京冬奥会";
             var encode = encodeURIComponent(c);
             console.log(encode);

             var decode = ("%E5%8C%97%E4%BA%AC%E5%86%AC%E5%A5%A5%E4%BC%9A");
            var str = decodeURIComponent(decode)
             console.log(str);


           
        </script>
    </head>
</html>